function _$(fun) {
    //此操作同jq $(fucntion ())
    if (typeof fun != "function") {
      throw new typeError("The argument passed in is not a function");
    } else {
      var doc = document;
      if (doc.addEventListener) {
        doc.addEventListener("DOMContentLoaded", fun, false);
      } else {
        doc.onreadystatechange = function() {
          if (
            doc.readyState == "loader" ||
            doc.readyState == "complete" ||
            doc.readyState == "interactive"
          ) {
            fun();
          }
        };
      }
    }
  }
  _$(function() {
    //全局公共变量
    var body_el = document.getElementsByTagName("body")[0];
    var head_el = document.getElementsByTagName("head")[0];
  
    var bj_header_cont = {
      // ================================================================================================
      // 页头导航
      page_nav: function() {
        // 页头导航
        var pageTop = document.createElement("div");
        body_el.insertBefore(pageTop, body_el.childNodes[0]);
        body_el.childNodes[0].setAttribute("class", "h-header clearfix");
  
        // 塞入导航左中右元素
        pageTop.innerHTML =
          '<div class="head">\
          <div class="nav">\
              <div><img width="28" src="./img/logo.png" alt=""></div>\
              <ul>\
                  <li>\
                      <span><a href="" target="_blank">首页</a></span>\
                  </li>\
                  <li><span>关于公司</span>\
                      <div>\
                          <span><a href="" target="_blank">公司概况</a></span>\
                          <span><a href="" target="_blank">业务概况</a></span>\
                      </div>\
                  </li>\
                  <li><span>产品服务</span>\
                      <div>\
                          <span><a href="" target="_blank">产品介绍</a></span>\
                          <span><a href="" target="_blank">行业应用</a></span>\
                          <span><a href="" target="_blank">质量检测</a></span>\
                          <span><a href="" target="_blank">原材料及生产环境</a></span>\
                      </div>\
                  </li>\
                  <li><span><a href="" target="_blank">用户服务</a></span></li>\
              </ul>\
          </div></div>\
              ';
      },

//公用底部
      publicBase: function() {
        var footer = document.getElementById('BASE');
        footer.innerHTML = '<div class="nav mt1100 flexbetween">\
        <div class="l">\
            <span><img width="34" src="./img/logo.png" alt=""></span>\
            <ul>\
                <li>\
                    <a href="">关于公司</a>\
                    <a href="">产品服务</a>\
                    <a href="">行业应用</a>\
                    <a href="">客户服务</a>\
                </li>\
                <li>\
                    <a href="">使用条款</a>\
                    <a href="">隐私策略</a>\
                    <a href="">人才招聘</a>\
                </li>\
            </ul>\
            <p>© 2021 江苏英伟医疗股份有限公司 版权所有</p>\
        </div>\
        <div>\
            <ul>\
                <li>电话：4008808888</li>\
                <li>邮箱：yingweiyilin@mail.com</li>\
                <li>地址：江苏省泗阳经济开发区文城东路215号</li>\
            </ul> </div> </div>'
      },
      media_adapter: function() {
        //小屏幕缩放
        var media_style = document.createElement("style");
        media_style.innerHTML =
          "@media screen and (max-width: 1366px) {\
                                           body {\
                                             zoom: 80%;\
                                           }";
        head_el.appendChild(media_style);
      },
   
      //点击a标签打开当前页面的新窗口
      eventUntil: {
        //全局事件器    用法:bj_header_cont.eventUntil.addEvent()
        addEvent: function(element, type, handler) {
          //dom2级事件
          if (element.addEventListener) {
            element.addEventListener(type, handler, true);
          } else if (element.attachEvent) {
            element.attachEvent("on" + type, function() {
              handler.call(element);
            });
          } else {
            element["on" + type] = handler;
          }
        },
        preventDefault: function(event) {
          // 取消事件的默认行为
          if (event.preventDefault) {
            event.preventDefault(); //标准w3c
          } else {
            event.returnValue = false; // IE
          }
        }
      }
    };
    //调用.....
    bj_header_cont.page_nav(); //页头导航
    bj_header_cont.publicBase(); //底部
  });	
   